package com.vvv.designpattern.controller;

import com.vvv.designpattern.iterator.EsSqlQuery;
import com.vvv.designpattern.service.EsQueryService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author vvv
 * @date 2023-11-27 14 35
 * discription
 */
@RestController
public class EsQueryController {
    @Resource
    private EsQueryService esQueryService;

    @PostMapping("/queryEsBySql")
    public Object queryEsBySql(@RequestBody EsSqlQuery esSqlQuery) {
        return esQueryService.queryEsBySql(esSqlQuery);
    }
}
